package cn.zcib.film.service.impl;

import cn.zcib.film.anno.Record;
import cn.zcib.film.bean.Role;
import cn.zcib.film.bean.vo.RoleVO;
import cn.zcib.film.mapper.RoleMapper;
import cn.zcib.film.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;
    @Override
    public List<Role> findRoles(RoleVO roleVO) {
        return roleMapper.findRoles(roleVO);
    }

    @Override
    public int addRole(Role role) {
        return roleMapper.addRole(role);
    }

    @Override
    public int updateRole(Role role) {
        return roleMapper.updateRole(role);
    }

    @Override
    public int deleteRole(Integer rId) {
        return roleMapper.deleteRole(rId);
    }

    @Override
    public List<Role> findRolesNoArgs() {
        return roleMapper.findRolesNoArgs();
    }

    @Override
    public Role getRoleById(Integer aId) {
        Role role = roleMapper.getRoleById(aId);
        return role;
    }
}
